feat(dashboard): render captured tool_output in session detail#8
feat(dashboard): render captured tool_output in session detail#8
Conversation
Surfaces the per-tool `tool_output` field that the publisher started capturing in #6. The session detail page now expands the tool badge when input or output is present and renders labeled `input` / `output` panes, mirroring `state.py:unpublished_slice`'s 256-char truncation so the dashboard shows the same bytes the extractor sees.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughTool output support is extended across the dashboard. The session reader now extracts Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
tool_outputfield that the publisher started capturing in feat: detached dashboard build + capture tool output for reflexio #6 — the dashboard previously only rendered tool input._TOOL_DATA_FIELD_MAX_LENinplugin/src/claude_smart/state.py) so the UI shows exactly the bytes the extractor sees.Changes
plugin/dashboard/lib/types.tsToolUsed.tool_dataextended to{ input?: Record<string, unknown>; output?: string }.plugin/dashboard/lib/session-reader.tsRawRecordgainstool_output?: string.TOOL_DATA_FIELD_MAX_LEN = 256constant with a comment pointing back tostate.py(single source of truth lives in Python; the cross-language duplicate is documented).truncateToolField<T>(value: T): Thelper — truncates only whenvalueis a string longer than the cap, passes everything else through untouched.foldTurnsnow foldstool_outputintotool_data.output(when non-empty) and runs each top-leveltool_inputvalue throughtruncateToolField. The "absent when empty" contract fromstate.py:unpublished_sliceis preserved.plugin/dashboard/app/sessions/[sessionId]/page.tsxt.tool_data?.outputalongsidet.tool_data?.input.<details>, renders labeledinputandoutputsections in a small stack — each a<pre>block with the existing styling.Test Plan
npx tsc --noEmit→ clean (EXIT=0).npx biome check lib/session-reader.ts lib/types.ts 'app/sessions/[sessionId]/page.tsx'→ clean (EXIT=0).input(existing) and the newoutputblock, truncated at 256 chars; tools with emptytool_outputcontinue to render input-only with no emptyoutputsection.Summary by CodeRabbit